/*
 * @Author: zhang zhijiang 2824735304@qq.com
 * @Date: 2025-05-20 18:19:09
 * @LastEditors: zhang zhijiang 2824735304@qq.com
 * @LastEditTime: 2025-05-20 19:58:08
 * @FilePath: /linux/minihttp/main.cc
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include"httpserver.hpp"
 void usage(string proc)
{
    cout<<"usage:"<<proc<<" port"<<endl;
}
int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        usage(argv[0]);
        exit(1);
    }
    int port = stoi(argv[1]);
    std::unique_ptr<httpserver> http_server = new httpserver(port);
    http_server->init();
    http_server->loop();
    return 0;
}